package com.wiscamp.ninechapters.problems.domain.repositories;

import com.wiscamp.ninechapters.problems.domain.models.sets.RegroupRule;
import cube.ddd.common.query.PagedObjects;
import cube.ddd.common.query.PagedQuery;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.util.Collection;

public interface RegroupRuleRepository {

    RegroupRule getRegroupRule(@Min(0) long ruleId);

    RegroupRule getRegroupRuleByCode(@NotBlank String ruleCode, @Min(0) long organizationId);

    Collection<RegroupRule> getRegroupRulesByName(@NotBlank String ruleName, @Min(0) long organizationId);

    Collection<RegroupRule> getRegroupRulesByCode(@NotBlank String ruleCode, @Min(0) long organizationId);

    Collection<RegroupRule> getRegroupRulesByOrganization(@Min(0) long organizationId);

    Collection<RegroupRule> getRulesByCreator(@Min(0) long creatorId);

    Collection<RegroupRule> getSpecialPracticeRules(@NotBlank String gradeLevel);

    PagedObjects<RegroupRule> getRegroupRulesByQuery(@NotNull PagedQuery query);

    RegroupRule saveRegroupRule(@NotNull RegroupRule rule);
}
